

import simplejson
import sys


finput = open(sys.argv[1])
job_params = simplejson.load(finput)



for it in [200,1000,10000]:
    for gspc in [1,2,4,8,16,32,64,128]:
        job_params['grid_spacing'] = gspc
        job_params['initial_trials'] = it

        fname = 'it%d_gspc%03d.json'%(it, gspc)
        print fname
        print job_params

        qq = open(fname, 'w')
        simplejson.dump(job_params, qq)
        qq.close()


